/**
 * @description tab
 */
const state = () => ({
  modal: false, //弹框
  tabModal: false,
  tabModalItem: 0,
  // PDA的标签页
  pdaTabModal: false, //弹框
})
const getters = {
  getModal: (state) => state.modal,
  gettabModal: (state) => state.tabModal,
  gettabModalItem: (state) => state.tabModalItem,
  // PDA
  getPdaTabModal: (state) => state.pdaTabModal,
}
const mutations = {
  modalSwitch(state) {
    state.modal = !state.modal
  },
  settabModalSwitch(state) {
    state.tabModal = !state.tabModal
  },
  settabModalItem(state, item) {
    state.tabModalItem = item
  },
  // PDA
  pdaTabModalSwitch(state) {
    state.pdaTabModal = !state.pdaTabModal
  },
}
const actions = {
  modalSwitch({ commit }) {
    commit('modalSwitch')
  },
  settabModalSwitch({ commit }) {
    commit('settabModalSwitch')
  },
  settabModalItem({ commit }, item) {
    commit('settabModalItem', item)
  },
  // PDA
  pdaTabModalSwitch({ commit }) {
    commit('pdaTabModalSwitch')
  },
}
export default { state, getters, mutations, actions }
